#ifndef TCP_SERVER_H
#define TCP_SERVER_H

#include <QMainWindow>
/*需要包含的头文件*/
#include <QTcpServer>
#include <QTcpSocket>
QT_BEGIN_NAMESPACE
namespace Ui { class tcp_server; }
QT_END_NAMESPACE

class tcp_server : public QMainWindow
{
    Q_OBJECT

public:
    tcp_server(QWidget *parent = nullptr);
    ~tcp_server();
    QTcpServer *tcpSever;
    QTcpSocket *tcpSocket;
private slots:
    void on_pushButton_open_sever_clicked();

    void on_pushButton_close_sever_clicked();

    void on_pushButton_end_data_clicked();

private:
    Ui::tcp_server *ui;
private slots:
    void newConnection_SLOT(void);
    void socketReadReadySLOT(void);
};
#endif // TCP_SERVER_H
